package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.CouponEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface CouponDao {
    Long insert(CouponEntity entity);

    void insertBatch(List<CouponEntity> list);

    CouponEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid );

    Integer update(CouponEntity entity);

    List<CouponEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    Integer updateBatch(@Param("list") List<CouponEntity> updateList,@Param("corpid") String corpid);

    List<CouponEntity> findEntitysByIdIn(@Param("list")List<Long> couponIdList,@Param("corpid") String corpid);
}